const db = require('../libs/db');
const {internal} = require("boom");

const getTestData = async (id) => {
    return new Promise((resolve, reject) => {
        const sql = 'SELECT * FROM test WHERE id = ?';
        db.exec({
            sql,
            params: [id],
            success: (resData) => {
                resolve(resData);
            },
            error: (err) => {
                reject(err);
            }
        });
    })
};

module.exports = {
    getTestData,
}
